<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>1_验证Diffing算法</title>
</head>

<body>
    <div id="test"></div>
    <script type="text/javascript" src="../js/react.development.js"></script>
    <script type="text/javascript" src="../js/react-dom.development.js"></script>
    <script type="text/javascript" src="../js/babel.min.js"></script>
    <script type="text/babel">
        class Time extends React.Component {
            state = {
                date: new Date()
            }
            componentDidMount() {
                setInterval(() => {
                    this.setState({ date: new Date() })
                }, 200)
            }
            render() {
                return (
                    <div>
                        <div >哈哈哈</div>
                        <div>
                            当前时间 {this.state.date.toTimeString()}
                            <input />
                        </div>
                    </div>
                )
            }
        }
        ReactDOM.render(<Time />, document.getElementById('test'))
    </script>
</body>
</html>